# Add files and directories to ship with the application 
# by adapting the examples below.
# file1.source = data\Mode7Demo.zip
# file1.path = e:\data
# dir1.source = mydir

QT       += core gui opengl multimedia declarative

QMAKE_CXXFLAGS += -O3

DEPLOYMENTFOLDERS =  #file1 #dir1

# Smart Installer package's UID
# This UID is from the protected range 
# and therefore the package will fail to install if self-signed
# By default qmake uses the unprotected range value if unprotected UID is defined for the application
# and 0x2002CCCF value if protected UID is given to the application
#symbian:DEPLOYMENT.installer_header = 0x2002CCCF

# Allow network access on Symbian

symbian {
    TARGET.UID3 = 0x2006CE25
    #TARGET.UID3 = 0x2006CE25
    # TARGET.CAPABILITY +=
    TARGET.EPOCSTACKSIZE = 80000
    TARGET.EPOCHEAPSIZE = 0x600000 0x2000000
    VERSION = 1.0.1
    ICON = EmiSnes.svg
    #my_note.pkg_postrules.main = "\"D:\\Dropbox\\EmiSnes\\EmiSnes\\Data\\Mode7Demo.zip\" \"E:\\data\\Mode7Demo.zip\""
    #DEPLOYMENT += my_note
    vendorinfo = "%{\"AndreBotelho\"}" ":\"AndreBotelho\""
    vendor_deploy.pkg_prerules += vendorinfo
    DEPLOYMENT += vendor_deploy
    supported_platforms = \
    "[0x20022E6D],0,0,0,{\"S60ProductID\"}"   # Symbian^3
    # remove default platforms
    default_deployment.pkg_prerules -= pkg_platform_dependencies
    # add our platforms
    platform_deploy.pkg_prerules += supported_platforms
    DEPLOYMENT += platform_deploy
}

# If your application uses the Qt Mobility libraries, uncomment
# the following lines and add the respective components to the 
# MOBILITY variable. 
CONFIG += mobility
MOBILITY += systeminfo


SOURCES += main.cpp\
        mainwindow.cpp \
     virtualkey.cpp \
     snesmachine.cpp \
     sneslinterface.cpp \
     emuinterface.cpp \
     snes9x/tile.cpp \
     snes9x/spc7110.cpp \
     snes9x/spc700.cpp \
     snes9x/soundux.cpp \
     snes9x/snapshot.cpp \
     snes9x/snaporig.cpp \
     snes9x/seta018.cpp \
     snes9x/seta011.cpp \
     snes9x/seta010.cpp \
     snes9x/seta.cpp \
     snes9x/server.cpp \
     snes9x/sdd1emu.cpp \
     snes9x/sdd1.cpp \
     snes9x/screenshot.cpp \
     snes9x/sa1cpu.cpp \
     snes9x/sa1.cpp \
     snes9x/ppu.cpp \
     snes9x/obc1.cpp \
     snes9x/netplay.cpp \
     snes9x/memmap.cpp \
     snes9x/loadzip.cpp \
     snes9x/globals.cpp \
     snes9x/gfx.cpp \
     snes9x/fxinst.cpp \
     snes9x/fxemu.cpp \
     snes9x/fxdbg.cpp \
     snes9x/dsp1.cpp \
     snes9x/dma.cpp \
     snes9x/debug.cpp \
     snes9x/data.cpp \
     snes9x/cpu.cpp \
     snes9x/clip.cpp \
     snes9x/cheats2.cpp \
     snes9x/cheats.cpp \
     snes9x/c4emu.cpp \
     snes9x/c4.cpp \
     snes9x/apudebug.cpp \
     snes9x/apu.cpp \
     snes9x/2xsai.cpp \
     snes9x/srtc.cpp \
     snes9x/unzip/unzip.c \
     snes9x/unzip/unshrink.c \
     snes9x/unzip/unreduce.c \
     snes9x/unzip/explode.c \
    CImageProvider.cpp


HEADERS  += mainwindow.h \
    snescontroller.h \
    qtmachine.h \
    machine.h \
    keydef.h \
    virtualkey.h \
    emuinterface.h

FORMS += mainwindow.ui

DEFINES += BSPF_WIN32 \
        QT_BUILD\
        CPU_SHUTDOWN\
        SPC700_SHUTDOWN\
        SPC700_C\
        ENABLE_ECHO_SOUND\
        ENABLE_SOUND_SYNC\
        ENABLE_INTERPOLATE_SOUND\
        ENABLE_GRAPHIC_WINDOWS\
        SDD1_DECOMP\
        __DJGPP__\
        __DJGCC\
        MITSHM\
        UNZIP_SUPPORT\
        ZLIB\
        HAVE_MKSTEMP\
        DISPLAY_FRAMERATE\
        FAST_LSB_WORD_ACCESS\
        ENABLE_HDMA\
        ENABLE_FIX_FREQUENCY\
        RIGHTSHIFT_IS_SAR\
        RIGHTSHIFT_INT8_IS_SAR\
        RIGHTSHIFT_INT16_IS_SAR\
        RIGHTSHIFT_INT32_IS_SAR\
        RIGHTSHIFT_INT64_IS_SAR\
        FX_DO_ROMBUFFER\
        DEBUG_FRAMESKIP\
        RELEASE

INCLUDEPATH +=  zlib/ \
                snes9x/ \
                snes9x/unzip/ \

win32:LIBS += -LD:\emu3 -lsnescpu


symbian:LIBS += -lsnescpu.lib

symbian: {
          INCLUDEPATH += /epoc32/include/mmf/server
          LIBS += -lmmfdevsound #required for CMMFDevSound
         }

RESOURCES += \
    EmiSnes.qrc

# Please do not modify the following two lines. Required for deployment.
include(deployment.pri)
qtcAddDeployment()

OTHER_FILES += \
    qtc_packaging/debian_harmattan/rules \
    qtc_packaging/debian_harmattan/README \
    qtc_packaging/debian_harmattan/manifest.aegis \
    qtc_packaging/debian_harmattan/copyright \
    qtc_packaging/debian_harmattan/control \
    qtc_packaging/debian_harmattan/compat \
    qtc_packaging/debian_harmattan/changelog \
    data/emuui.qml \
    data/emuuiportrait.qml \
    data/Keyconfig.qml
